﻿define([

], function () {

    var Model = Backbone.Model.extend({
        list: function (id, callbackOk) {
            send("preference/List", { moduleId: id }, null, callbackOk);
        },
        getPreference: function (id, callbackOk) {
            send("preference/Get/" + id, null, null, callbackOk);
        },
        update: function (preference, callbackOk) {
            send("preference/Update", preference, { type: "PUT" }, callbackOk);
        },
        create: function (preference, callbackOk) {
            send("preference/Create", preference, { type: "POST" }, callbackOk);
        },
        deletePreference: function (id, callbackOk) {
            send("preference/Delete/" + id, null, { type: "DELETE" }, callbackOk);
        },
        // Funciones para Modulos de Preferencias
        listPrefModules: function (callbackOk){
            send("preferenceModule/List", null, null, callbackOk);
        }
    });
    return Model;
});